package com.util;

import com.bean.BootStrapTableED;
import com.bean.BootStrapTableExpress;
import com.bean.EDelivery;
import com.bean.Express;

import java.util.ArrayList;
import java.util.List;

/**
 * @author LEIKE
 * @Description:
 * @Date_Created_in: 2021/5/27 17:00
 * @Modified_By:
 * @Project: ExpressDeliveryE
 */
public class EDeliveryUtil {

    public static List<BootStrapTableED> setBootStrapTableED(List<EDelivery> edList){
        List<BootStrapTableED> list = new ArrayList<>();
        for (EDelivery e: edList) {
            String registeredTime = DateFormatUtil.format(e.getRegisteredTime());
            String lastTime = e.getLastTime()==null?"今日":DateFormatUtil.format(e.getLastTime());
//            String status = e.getStatus()==0?"待取件":"已取件";
            BootStrapTableED e2 = new BootStrapTableED(e.getId(),e.getName(),e.getPhone(),e.getIdNumber(),e.getPassWord(),e.getDeliveryNumber(),registeredTime, lastTime);
            list.add(e2);
        }
        return list;
    }

}
